#import "SFUConstants.h"

// Width of the view
int const VIEW_WIDTH = 320;
// TabBar height
int const TAB_BAR_WIDTH = 44;
// Height of the view
int const VIEW_HEIGHT = 436;
// Height of Map View
int const MAP_VIEW_HEIGHT = 416-44;
// Left and right margin padding for content in the view
int const HORIZONTAL_PADDING = 10;
// Minimum zoom scale of content in the view
CGFloat const MIN_ZOOM_SCALE = 0.75;
// Maximum zoom scale of content in the view
CGFloat const MAX_ZOOM_SCALE = 3.0;
// Event table view cell height
int const EVENT_CELL_HEIGHT = 100;
// Building table view cell height
int const BUILDING_CELL_HEIGHT = 50;
// Point of interest table view cell height
int const POI_CELL_HEIGHT = 40;
// Maximum length of event heading shown in event cell
int const MAX_HEADING_LENGTH = 50;
// Maximum length of event description shown in event cell
int const MAX_DESCRIPTION_LENGTH = 100;
// default latitude
double const DEFAULT_LATITUDE = 49.278555f;
//default longitude
double const DEFAULT_LONGITUDE = -122.914831f;
//default span value(zoom)
double const DEFAULT_SPAN = 0.0235f;
//search span
double const SEARCH_SPAN = 0.005f;
// Unique subdirectory to store the collection archive
NSString* const EVENT_SUBDIRECTORY = @"event_data";
// Unique archive key for keyed archiving of the collection
NSString* const SFUEVENT_ARCHIVE_KEY = @"SFUPersistentEventCollection";
// Maximum timeout interval for HTTP URL connections
double const CONN_TIMEOUT_INTERVAL = 60.0;
// Name of the file containing all bookmarked event data
NSString* const BOOKMARKED_EVENTS_FILENAME = @"bookmarked.event";

/**
 * SFUConstants is an object containing all the constants
 * for the application.
 *
 * @author      James Lin
 * @author      Justin Hollander
 * @since       0.1.0
 */
@implementation SFUConstants

static NSString* const searchOptions[] = 
{ @"Search for building", @"Search for events on campus" }; 

// All valid SFU events calendar URLs (size including commented out = 43*2)
static NSString* const calendarURLs[] = 
	{ @"SFU Events Calendar", @"http://events.sfu.ca/rss/calendar_id/2.xml", 
	  @"Academic Advising", @"http://events.sfu.ca/rss/calendar_id/29.xml", 
	//  @"Academic Dates", @"http://events.sfu.ca/rss/calendar_id/4.xml", 
	//  @"Biological Sciences", @"http://events.sfu.ca/rss/calendar_id/10.xml", 
	  @"Business Administration", @"http://events.sfu.ca/rss/calendar_id/24.xml", 
  	//  @"Chemistry Department Events", @"http://events.sfu.ca/rss/calendar_id/8.xml", 
	//  @"Continuing Studies", @"http://events.sfu.ca/rss/calendar_id/7.xml", 
	//  @"Earth Sciences", @"http://events.sfu.ca/rss/calendar_id/20.xml", 
	//  @"Environmental Health and Safety", @"http://events.sfu.ca/rss/calendar_id/12.xml", 
	//  @"Faculty of Arts and Social Sciences", @"http://events.sfu.ca/rss/calendar_id/25.xml", 
	//  @"Faculty of Health Sciences", @"http://events.sfu.ca/rss/calendar_id/21.xml", 
	//  @"Graduate Studies Calendar", @"http://events.sfu.ca/rss/calendar_id/9.xml", 
	//  @"Holidays and Closures", @"http://events.sfu.ca/rss/calendar_id/1.xml", 
	//  @"International Development", @"http://events.sfu.ca/rss/calendar_id/23.xml", 
	//  @"Teaching and Learning Centre", @"http://events.sfu.ca/rss/calendar_id/17.xml", 
	//  @"Molecular Biology & Biochemistry", @"http://events.sfu.ca/rss/calendar_id/11.xml", 
	//  @"Philosophy Department", @"http://events.sfu.ca/rss/calendar_id/27.xml", 
	//  @"Research Studies", @"http://events.sfu.ca/rss/calendar_id/15.xml", 
	//  @"School for International Studies", @"http://events.sfu.ca/rss/calendar_id/14.xml", 
	//  @"School of Communication", @"http://events.sfu.ca/rss/calendar_id/16.xml", 
	  @"SFU ULife Calendar", @"http://events.sfu.ca/rss/calendar_id/3.xml", 
	  @"SFU Volunteer Services", @"http://events.sfu.ca/rss/calendar_id/18.xml", 
	//  @"Student Services Deadlines", @"http://events.sfu.ca/rss/calendar_id/30.xml", 
	  @"Surrey Events Calendar", @"http://events.sfu.ca/rss/calendar_id/5.xml", 
	//  @"Sustainability/Environmental Events", @"http://events.sfu.ca/rss/calendar_id/26.xml", 
	//  @"Vancouver Events Calendar", @"http://events.sfu.ca/rss/calendar_id/6.xml", 
	  @"Advising", @"http://events.sfu.ca/rss/item_type_id/23.xml", 
	  @"Arts & Culture", @"http://events.sfu.ca/rss/item_type_id/6.xml", 
	  @"Ceremonies", @"http://events.sfu.ca/rss/item_type_id/7.xml", 
	  @"Dates & Deadlines", @"http://events.sfu.ca/rss/item_type_id/18.xml", 
	  @"Entertainment", @"http://events.sfu.ca/rss/item_type_id/1.xml", 
	  @"Fundraisers & Service", @"http://events.sfu.ca/rss/item_type_id/14.xml", 
	//  @"Holiday", @"http://events.sfu.ca/rss/item_type_id/5.xml", 
	  @"Information Sessions", @"http://events.sfu.ca/rss/item_type_id/8.xml", 
	  @"Lectures & Talks", @"http://events.sfu.ca/rss/item_type_id/9.xml", 
	//  @"Meetings", @"http://events.sfu.ca/rss/item_type_id/2.xml", 
	  @"Recreation", @"http://events.sfu.ca/rss/item_type_id/17.xml", 
	  @"Religion/Spiritual", @"http://events.sfu.ca/rss/item_type_id/16.xml", 
	  @"Research Studies", @"http://events.sfu.ca/rss/item_type_id/22.xml", 
	  @"Special Events", @"http://events.sfu.ca/rss/item_type_id/12.xml", 
	//  @"Thesis Defences", @"http://events.sfu.ca/rss/item_type_id/10.xml", 
	  @"Varsity Athletics", @"http://events.sfu.ca/rss/item_type_id/11.xml", 
	  @"Workshops", @"http://events.sfu.ca/rss/item_type_id/15.xml" }; 
	
+ (NSArray*)getSearchOptions {
	return [NSArray arrayWithObjects:searchOptions count:2];
}

+ (NSDictionary*)getCalendarURLs {
	NSMutableDictionary* tempDict = [[[NSMutableDictionary alloc] init] autorelease];
	for (int i = 0; i < sizeof(calendarURLs)/sizeof(NSString); i += 2) {
		[tempDict setValue:calendarURLs[i+1] forKey:calendarURLs[i]];
	}
	return tempDict;
}

@end
